import { Csv } from "./Csv";

export class CfgPlayer {
    id : number = 0;
    name : string = '';
    age : number = 0;
    nameparams : string[] = [];
    valueparams : number[] = [];


}
export  class ConfigPlayer {
    public static csvData: { [key: number]: CfgPlayer } = {};

    public static loadCsv(): void {

        const csvData = Csv.csvData["Player"];
        for (const key in csvData) {
            const params = csvData[key];
            const configData: CfgPlayer = {
                id : params[0],
                name : params[1],
                age : params[2],
                nameparams : params[3],
                valueparams : params[4],


            }
            this.csvData[key] = configData;

        }
    }
}
const CfgPlayers = ConfigPlayer.csvData;
export default CfgPlayers;